package com.zbl.zblproject.erp.entity;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/12/10
 * 订单状态的枚举类型,  未使用.
 */
public enum ErpOrderStatus {

    //0:草稿 1:待审核 2:通过 3.财务审核
    draft(0, "草稿"),
    submit(1, "待审核"),
    pass(2, "通过"),
    finance(3, "财务审核"),
    financeFinish(4, "财务审核完成"),
    returnOrder(5, "退回订单"),;




    private int status;

    private String name;

    public static ErpOrderStatus valueOf(int value){
        switch(value){
            case 0:
                return draft;
            case 1:
                return submit;
            case 2:
                return pass;
            case 3:
                return finance;
            case 4:
                return financeFinish;
            case 5:
                return returnOrder;
            default:
                throw new RuntimeException("没有这个状态节点!");
        }
    }

    ErpOrderStatus(int status, String name){
        this.status = status;
        this.name = name;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
